package com.woniu.auth.controller;

import com.woniu.auth.dto.PermissionDTO;
import com.woniu.auth.service.SysPermissionService;
import com.woniu.common.util.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: TODO
 * @Author: WangHeng
 * @Date: 2022/12/12 16:21
 */
@RestController
@RequestMapping("permissions")
@Api(value = "用户接口", tags = "AuthApi")
public class PermissionController {
    @Autowired
    private SysPermissionService permissionService;
    @PutMapping("savePers")
    public Result savePermission(@RequestBody PermissionDTO permissionDTO){
        permissionService.updatePermissionByRid(permissionDTO);
        return Result.ok();
    }
}
